﻿@{
    Layout = null;
    ViewBag.Title = "角色管理";
}


<!--Operation-->
<div class="heading-buttons">


    <div class="col-xs-12 col-sm-7 col-md-7 col-lg-4">
        <h1 class="page-title txt-color-blueDark"><i class="fa  fa-pencil "></i>
            角色管理			
        </h1>
    </div>
    <div class="buttons pull-right">

        <button type="button" class="btn btn-success btn-labeled " id="btnSysRoleAdd"
            data-bind="click: $root.AddNewNode">
            <span class="btn-label"><i class="glyphicon glyphicon-plus"></i>
            </span>新建角色</button>

        <button type="button" class="btn btn-primary btn-labeled " id="btnSysRoleDel"
            data-bind="click: $root.DelNode">
            <span class="btn-label"><i class="glyphicon glyphicon-remove"></i>
            </span>删除角色</button>


    </div>
    <div style="clear: both;">
    </div>
</div>
<!--/Operation-->


<hr class="separator" />
<!-- Bread crumb is created dynamically -->



<div class="row">

    <div class="col-sm-4" style="margin-bottom: 5px; margin-top: 5px;">
        <div class="well well-light well-sm no-margin no-padding treeContent" style="min-height:350px;">
            <!--SysRole tree-->
            <ul id="SysRoleTree" class="ztree">
            </ul>
        </div>

    </div>
    <!-- end col-sm-61 -->
    <!--/SysRole tree-->

    <!--SysRole  information-->
    <div class="col-sm-8" style="margin-bottom: 5px; margin-top: 5px;">
        <div class="well well-light well-sm no-margin no-padding treeContent"style="min-height:350px;">
            <input type="hidden" id="hidId" />
            <form class="form-horizontal" id="frmSysRole" data-bind="with: NodeValue">

                <fieldset>
                    <div class="row" style="border-bottom: dashed 1px; margin-bottom: 10px;margin-left:1.5%;margin-right:0.5%;">
                        <h3 style="padding: 10px 0 10px 10px; float: left;margin:0px 10px 4px 10px;">
                          <strong>详细信息</strong></h3>
                        <div class="buttons pull-right">

                            <button type="button" id="btnSysRoleUpdate" class="btn btn-success btn-labeled " style="margin-top: 5px;margin-right: 10px;" data-bind="click: $root.updateNode">
                                <span class="btn-label"><i class="fa fa-save"></i>
                                </span>保存</button>

                        </div>
                    </div>

                    <div style="clear: both;" />


                     <input type='hidden' id='txtbId' name='txtbId' placeholder='' class='form-control' data-bind='value:Id' />

                    <div class='form-group'>
                        <label class='col-md-2 control-label' style='margin-bottom: 3px;'>角色名称:</label><div class='col-md-9'>
                            <input type='text' id='txtbSRoleName' name='txtbSRoleName' placeholder='' class='form-control' data-bind='value:SRoleName' />
                        </div>
                    </div>
                    <div class='form-group'>
                        <label class='col-md-2 control-label' style='margin-bottom: 3px;'>角色描述:</label><div class='col-md-9'>
                            <input type='text' id='txtbSDis' name='txtbSDis' placeholder='' class='form-control' data-bind='value:SDis' />
                        </div>
                    </div>

                    <div class='form-group'>
                        <label class='col-md-2 control-label' style='margin-bottom: 3px;'>拥有权限:</label><div class='col-md-6'>
                            <input type='text' id='txtbSPower' name='txtbSPower' placeholder='' class='form-control' data-bind='value:SPower' />
                        </div>                      
                        <a href="#myModal"  role="button" class="btn btn-default" data-toggle="modal"><i class="fa fa-cog"></i>选择权限</a>
                    </div>


                     <input type='hidden' id='txtbILevel' name='txtbILevel' placeholder='' class='form-control' data-bind='value:ILevel' />
            
                       <input type='hidden' id='txtbIParentID' name='txtbIParentID' placeholder='' class='form-control' data-bind='value:IParentID' />

              
                </fieldset>
            </form>
        </div>
    </div>
</div>
<!-- end row -->
<!--/SysRole information-->


<!--Power tree-->
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:600px;">
    <div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel"><strong>角色权限设置</strong></h3>
    </div>
    <div class="modal-body">        
        <ul id="Powertree" class="ztree"></ul>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
        <button class="btn btn-primary" id="confirm_power">授权</button>
    </div>
        </div>
</div>

<script>
    pageSetUp();
    var pagefunction = function () {
        
        


                    loadScript("/PageJs/Role.js", function () {



                    });


      
           


                
    };
    pagefunction();
</script>
